<div id="header">
    <div class="shell">
        <!-- Logo + Top Nav -->
        <div id="top">
            <h1>NuFashion</h1>
            <div id="top-navigation">
                Xin chào <strong><?php echo($_SESSION['user']); ?></strong>
                <span>|</span>
                <a href="../action/logoutAction.php">Thoát</a>
            </div>
        </div>
        <!-- End Logo + Top Nav -->

        <!-- Main Nav -->
        <div id="navigation">
            <ul>
                <?php
                include_once("../service/userService.php");
                $currentFile = $_SERVER["PHP_SELF"];
                $parts = Explode('/', $currentFile);
                $pagename = $parts[count($parts) - 1];

                $index = "";
                $product = "";
                $category = "";
                $product_attribute = "";
                $user = "";
                $banner = "";

                if ($pagename == "index.php") {
                    $index = "index";
                } else if ($pagename == "product.php" || $pagename == "productdetail.php") {
                    $product = "product";
                } else if ($pagename == "productattribute.php") {
                    $product_attribute = "attr";
                } else if ($pagename == "User.php") {
                    $user = "user";
                } else if ($pagename == "category.php") {
                    $category = "cate";
                } else if ($pagename == "banner.php") {
                    $banner = "banner";
                }
                
                ?>
                <li><a href="index.php?page_name=index" class="<?php if ($index != "") echo('active'); ?>"><span>Bảng Điều Khiển</span></a></li>
                <li><a href="category.php" class="<?php if ($category != "") echo('active'); ?>"><span>Phân Loại</span></a></li>
                <li><a href="product.php" class="<?php if ($product != "") echo('active'); ?>"><span>Sản Phẩm</span></a></li>
                <li><a href="productattribute.php" class="<?php if ($product_attribute != "") echo('active'); ?>"><span>Chi Tiết Sản Phẩm</span></a></li>
                <li><a href="banner.php" class="<?php if ($banner != "") echo('active'); ?>"><span>Banner</span></a></li>
                <li><a href="User.php" class="<?php if ($user != "") echo('active'); ?>"><span>Tài Khoản</span></a></li>
            </ul>
        </div>
        <!-- End Main Nav -->
    </div>
</div>